﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;

namespace QFlow.Data
{
    public static class PaymentMethodsExtension
    {
        public static PaymentMethod GetCashMethod(this Table<PaymentMethod> queriable)
        {
            return queriable.Single(method => method.PaymentMethodID == 1);
        }

        public static PaymentMethod GetPendingMethod( this Table<PaymentMethod> queriable)
        {
            return queriable.Single(method => method.PaymentMethodID == 2);
        }

        public static PaymentMethod GetInAdvanceMethod(this Table<PaymentMethod> queriable)
        {
            return queriable.Single(method => method.PaymentMethodID == 3);
        }
    }
}
